<?php

class Core_Core {

	/**
	 *
	 * @var Core_Core
	 */
	static private $_instance = null;

	/**
	 * Handler of configuration object
	 * @var Core_Config
	 */
	private $_configs;

	/**
	 *
	 * @var Core_Methods_Data_App
	 */
	private $_app;
	
	/**
	 *
	 * @var Core_WebService_Data_App
	 */
	private $_soapApp;
	
	/**
	 *
	 * @var Applications
	 */
	private $_application = null;
	
	/**
	 * Initialization method, creates obejcts
	 */
	private function init() {
		$this->_configs = Core_Config::getInstance();
	}

	private function __construct() {

	}

	private function __clone() {

	}

	/**
	 *
	 * @return Core_Core
	 */
	public static function getInstance() {
		if (self::$_instance === null) {
			self::$_instance = new self();
			self::$_instance->init();
		}
		return self::$_instance;
	}

	/**
	 *
	 * @return Core_Config
	 */
	public function getConfigs() {
		return $this->_configs;
	}

	/**
	 *
	 * @param App_Methods_Data_App $app
	 */
	public function setApp(App_Methods_Data_App $app) {
		$this->_app = $app;
	}
	
	/**
	 *
	 * @return Core_Methods_Data_App
	 */
	public function getApp() {
		return $this->_app;
	}
	
	/**
	 *
	 * @param App_WebService_Data_App $app
	 */
	public function setSoapApp(App_WebService_Data_App $app) {
		$this->_app = $app;
	}
	
	/**
	 *
	 * @return Core_WebService_Data_App
	 */
	public function getSoapApp() {
		return $this->_app;
	}
	
	/**
	 *
	 * @param Applications $application
	 */
	public function setApplication(Applications $application) {
		$this->_application = $application;
	}
	
	/**
	 *
	 * @return Core_WebService_Data_App
	 */
	public function getApplication() {
		return $this->_application;
	}
	
}
